<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="description" content="">
	<meta name="author" content="">
	<title>YIWU ZHADONG TRADING CO.,LTD</title>
    <link rel="icon" href="./images/favicon.ico" />
	<link href="css/bootstrap.min.css" rel="stylesheet">
	<link href="css/font-awesome.min.css" rel="stylesheet">
	<link href="css/prettyPhoto.css" rel="stylesheet">
	<link href="css/price-range.css" rel="stylesheet">
	<link href="css/animate.css" rel="stylesheet">
	<link href="css/main.css" rel="stylesheet">
	<link href="css/responsive.css" rel="stylesheet">
	<!--[if lt IE 9]>
    <script src="js/html5shiv.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->
	<link rel="shortcut icon" href="images/ico/favicon.ico">
	<link rel="apple-touch-icon-precomposed" sizes="144x144" href="images/ico/apple-touch-icon-144-precomposed.png">
	<link rel="apple-touch-icon-precomposed" sizes="114x114" href="images/ico/apple-touch-icon-114-precomposed.png">
	<link rel="apple-touch-icon-precomposed" sizes="72x72" href="images/ico/apple-touch-icon-72-precomposed.png">
	<link rel="apple-touch-icon-precomposed" href="images/ico/apple-touch-icon-57-precomposed.png">
    <style>
        @media (max-width: 767px) {
            .mainmenu ul li:first-child{
                padding-left: 15px !important;
            }
            .mainmenu ul li a.active{
                padding-left: 0 !important;
            }
        }
    </style>
</head>
<!--/head-->

<body>
	<div id="app" v-cloak>
		<header id="header">
			<!--header-->
			<div class="header_top">
				<!--header_top-->
				<div class="container">
					<div class="row">
						<div class="col-sm-6 ">
							<div class="contactinfo">
								<ul class="nav nav-pills">
									<li><a href="#"><i class="fa fa-phone"></i> {{ website.tel }}</a></li>
									<li><a href="#"><i class="fa fa-envelope"></i> {{ website.email }}</a></li>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
			<!--/header_top-->

			<div class="header-middle">
				<!--header-middle-->
				<div class="container">
					<div class="row">
						<div class="col-sm-12">
							<div class="logo pull-left">
								<a href="index.html"><img style="width: 60px;" src="images/home/logo.png" alt="" /></a>
							</div>
							<div class="pull-left" id="diy-menu" style="position: relative;top: 20px;left: 20px;">
                                <div class="navbar-header">
                                    <button type="button" class="navbar-toggle" data-toggle="collapse"
                                        data-target=".navbar-collapse">
                                        <span class="sr-only">Toggle navigation</span>
                                        <span class="icon-bar"></span>
                                        <span class="icon-bar"></span>
                                        <span class="icon-bar"></span>
                                    </button>
                                </div>
                                <div class="mainmenu pull-left">
                                    <ul class="nav navbar-nav collapse navbar-collapse">
                                        <li><a href="index.html">{{ t.l1 }}</a></li>
                                        <li><a href="products.html" class="active">{{ t.l2 }}</a></li>
                                        <li><a href="#contact-page">{{ t.l3 }}</a></li>
                                    </ul>
                                </div>
							</div>
							<div class="btn-group pull-right" style="margin-left: 10px;margin-top: 5px;" v-if="langcode == 'EN'">
								<div class="btn-group">
									<button type="button" class="btn btn-default dropdown-toggle usa"
										data-toggle="dropdown">
										EN
										<span class="caret"></span>
									</button>
									<ul class="dropdown-menu">
										<li><a href="###" @click.stop="changeLang('CN')">CN</a></li>
									</ul>
								</div>
							</div>
							<div class="btn-group pull-right" style="margin-left: 10px;margin-top: 5px;" v-if="langcode == 'CN'">
								<div class="btn-group">
									<button type="button" class="btn btn-default dropdown-toggle usa"
										data-toggle="dropdown">
										CN
										<span class="caret"></span>
									</button>
									<ul class="dropdown-menu">
										<li><a href="###" @click.stop="changeLang('EN')">EN</a></li>
									</ul>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<!--/header-middle-->

			<div class="header-bottom">
				<!--header-bottom-->
				<div class="container">
					<div class="row">
						<div class="col-sm-9">
						</div>
						<div class="col-sm-3">
							<div class="search_box pull-right">
								<input type="text" v-model="keyword" :placeholder="t.l19" @keyup.enter="searchList" />
							</div>
						</div>
					</div>
				</div>
			</div>
		</header>

		<section>
			<div class="container">
				<div class="row">
					<div class="col-sm-3">
						<div class="left-sidebar">
							<h2>{{ t.l18 }}</h2>
							<div class="panel-group category-products" id="accordian">
								<!--category-productsr-->
								<div class="panel panel-default" v-for="item,i in cateList">
									<div class="panel-heading">
										<h4 class="panel-title">
											<a data-toggle="collapse" data-parent="#accordian" :href="'#sportswear-'+i">
												<span class="badge pull-right"><i class="fa fa-plus"></i></span>
												{{ item.name }}
											</a>
										</h4>
									</div>
									<div :id="'sportswear-'+i" class="panel-collapse collapse">
										<div class="panel-body">
											<ul v-if="item.children.length">
												<li v-for="jtem,j in item.children">
													<div class="panel-group" :id="'accordian2-'+i" v-if="jtem.children.length">
														<!--category-productsr-->
														<div class="panel panel-default">
															<div class="panel-heading" style="padding-right: 5px;padding-left: 0;">
																<h4 class="panel-title">
																	<a data-toggle="collapse" :data-parent="'#accordian2-'+i" :href="'#sportswear-'+i+'-'+j">
																		<span class="badge pull-right"><i class="fa fa-plus"></i></span>
																		{{ jtem.name }}
																	</a>
																</h4>
															</div>
															<div :id="'sportswear-'+i+'-'+j" class="panel-collapse collapse">
																<div class="panel-body">
																	<ul>
																		<li v-for="xtem,x in jtem.children"><a href="###" :class="cateId==xtem.id?'cate-id':''" @click.stop="careChange(xtem.id)">{{ xtem.name }} </a></li>
																	</ul>
																</div>
															</div>
														</div>
													</div>
													<a href="###" @click.stop="careChange(jtem.id)" :class="cateId==jtem.id?'cate-id':''" v-else>{{ jtem.name }} </a>
												</li>
											</ul>
											<ul v-else>
												<li><a href="###" @click.stop="careChange(item.id)" :class="cateId==item.id?'cate-id':''">{{ item.name }} </a></li>
											</ul>
										</div>
									</div>
								</div>
							</div>
							<!--/category-productsr-->

						</div>
					</div>

					<div class="col-sm-9 padding-right">
						<div class="features_items">
							<!--features_items-->
							<h2 class="title text-center">{{ t.l5 }}</h2>
							<div class="col-sm-4" v-for="item,i in proList">
								<div class="product-image-wrapper">
									<div class="single-products">
										<div class="productinfo text-center">
											<img @click="preimg = item.images" :src="item.images" style="max-height: 300px;" alt="" />
											<h3 style="height: 30px;" class="text-cut textL pl10">
												{{ item.name }}</h3>
											<p style="height: 40px;" class="text-cut2 textL pl10">
												{{ item.contents }}</p>
										</div>
									</div>
								</div>
							</div>
							<div class="col-sm-12" v-if="proList.length">
								<ul class="pagination">
									<li :class="page==item?'active':''" v-for="item in last_page"><a href="###" @click.stop="changePage(item)">{{ item }}</a></li>
								</ul>
							</div>
							<div class="col-sm-12" v-if="!proList.length">
								<div class="w100 flex flexC flexL" style="height: 400px;"><img style="width: 250px;" src="/images/404/404.png" alt=""></div>
							</div>
						</div>
						<!--features_items-->
					</div>
				</div>
			</div>
			<div id="contact-page" class="container">
				<div class="bg">
					<div class="row">
						<div class="col-sm-12">
							<h2 class="title text-center">Contact <strong>Us</strong></h2>
							<!-- <div id="gmap" class="contact-map">
					</div> -->
						</div>
					</div>
					<div class="row">
						<div class="col-sm-8">
							<div class="contact-form">
								<h2 class="title text-center">Get In Touch</h2>
								<div class="status alert alert-success" style="display: none"></div>
								<form id="main-contact-form" class="contact-form row" name="contact-form" method="post"
									onsubmit="return false;">
									<div class="form-group col-md-6">
										<input id="feed-name" type="text" name="name" class="form-control"
											required="required" :placeholder="t.l10">
									</div>
									<div class="form-group col-md-6">
										<input id="feed-email" type="email" name="email" class="form-control"
											required="required" :placeholder="t.l11">
									</div>
									<div class="form-group col-md-12">
										<input id="feed-title" type="text" name="title" class="form-control"
											required="required" :placeholder="t.l12">
									</div>
									<div class="form-group col-md-12">
										<textarea name="content" id="message" required="required" class="form-control"
											rows="8" :placeholder="t.l13"></textarea>
									</div>
									<div class="form-group col-md-12">
										<input type="submit" name="submit" class="btn btn-primary pull-right"
											:value="t.l17" onclick="subform()">
									</div>
								</form>
							</div>
						</div>
						<div class="col-sm-4">
							<div class="contact-info">
								<h2 class="title text-center">{{ t.l9 }}</h2>
								<address>
									<p>{{ t.l14 }}: {{ website.tel }}</p>
									<p style="margin-top: 15px;">{{ t.l15 }}: {{ website.fax }}</p>
									<p style="margin-top: 15px;">{{ t.l11 }}: {{ website.email }}</p>
									<p style="margin-top: 15px;">{{ t.l16 }}: {{ website.address }}</p>
								</address>
							</div>
						</div>
					</div>
				</div>
			</div>
		</section>

		<footer id="footer">
			<!--Footer-->
			<div class="footer-top">
			</div>

			<div class="footer-bottom">
				<div class="container">
					<div class="row">
						<p class="pull-left">Copyright © 2025 E-SHOPPER Inc. All rights reserved.</p>

					</div>
				</div>
			</div>

		</footer>
		<!--/Footer-->
		<div class="pre-img" v-if="preimg" @click="preimg = ''">
			<img :src="preimg" alt="">
		</div>
	</div>



	<script src="js/jquery.js"></script>
	<script src="js/price-range.js"></script>
	<script src="js/jquery.scrollUp.min.js"></script>
	<script src="js/bootstrap.min.js"></script>
	<script src="js/jquery.prettyPhoto.js"></script>
	<script type="text/javascript" src="js/vue.min.js"></script>
	<script src="js/main.js"></script>
	<script>
		var vue = null;
		function subform() {
			const params = {
				name: $('#feed-name').val(),
				email: $('#feed-email').val(),
				title: $('#feed-title').val(),
				content: $('#message').val(),
			}
			if (!params.name || !params.email || !params.title || !params.content) {
				return;
			}
			$.ajax({
				method: 'POST',
				url: BASE_URL_REQUEST + '/api/shop/feedback/add',
				data: JSON.stringify(params),
				contentType: 'application/json; charset=UTF-8',
				success() {
                    const langcode = localStorage.getItem('langcode') || 'EN';
					$('#feed-name').val('');
					$('#feed-email').val('');
					$('#feed-title').val('');
					$('#message').val('');
                    if(langcode == 'EN'){
                        alert("Submitted successfully");
                    }else{
                        alert("提交成功");
                    }
				}
			})
			console.log('提交', params, BASE_URL_REQUEST);
		}
		$(document).ready(function () {
			vue = new Vue({
				el: '#app',
				data() {
					return {
                        langcode: 'EN',
                        t: {},
						website: {},
						page: 1,
						last_page: 0,
						per_page: 12,
						total: 0,
						cateList: [],
						proList: [],
						keyword: '',
						cateId: '',
						preimg: '',
					}
				},
				mounted() {
                    this.langcode = localStorage.getItem('langcode') || 'EN';
                    this.t = LANG[this.langcode];
                    document.title = this.t.title;
					this.getSwiper();
					this.getCate();
					this.getList();
				},
				methods: {
					chunkArray(arr, size){
						let result = [];
						for (let i = 0; i < arr.length; i += size) {
							result.push(arr.slice(i, i + size));
						}
						return result;
					},
					getSwiper() {
						const t = this;
						$.ajax({
							method: 'POST',
							url: BASE_URL_REQUEST + '/api/shop/config/detail',
							data: JSON.stringify({
								id: 22
							}),
							contentType: 'application/json; charset=UTF-8',
							success(res) {
								if (res.data.value) {
									const value = JSON.parse(res.data.value);
									if (value.website) {
										t.website = value.website;
									}
								}
							}
						})
					},
					getCate() {
						const t = this;
						$.ajax({
							method: 'POST',
							url: BASE_URL_REQUEST + '/api/shop/pronoauth/cate',
							data: JSON.stringify({}),
							contentType: 'application/json; charset=UTF-8',
							success(res) {
								t.cateList = res.data;
								console.log(res.data);
							}
						})
					},
					getList() {
						const t = this;
						const params = {
							page: t.page,
							per_page: t.per_page,
						}
						if(t.keyword){
							params.search = t.keyword
						}
						if(t.cateId){
							params.type_id = t.cateId
						}
						$.ajax({
							method: 'POST',
							url: BASE_URL_REQUEST + '/api/shop/pronoauth/list',
							data: JSON.stringify(params),
							contentType: 'application/json; charset=UTF-8',
							success(res) {
								console.log(res);
								t.proList = res.data.data
								t.total = res.data.total
								t.last_page = res.data.last_page
							}
						})
					},
					changePage(p){
						this.page = p;
						this.getList();
					},
					searchList(e){
						this.page = 1;
						this.getList();
					},
					careChange(e){
						this.cateId = e;
						this.getList();
					},
                    changeLang(code){
                        localStorage.setItem('langcode', code); 
                        this.langcode = code;
                        this.t = LANG[code];
                        location.reload();
                    }
				}
			})
		});
	</script>
</body>

</html>